<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
  <script>
    var arr = [];
    for(var i = 2; i < 100; i++){
      var yes = true;
      for(var j = 2; j <= i / 2; j++){
        if(i % j == 0){
          yes = false;
          break;
        }
      }
      if(yes){
        arr.push(i);
      }
    }
    document.writeln('100以内的素数是:'+arr);
  </script>
</head>
<body>

</body>
</html>
